package com.hand.ui;

import javafx.scene.control.*;

public class MainWindowsComponent {
    private final TextArea infoArea;
    private final TextField invoiceFlag;
    private final TextField product;
    private final TextField line;

    private MainWindowsComponent() {
        this.infoArea = new TextArea();
        this.invoiceFlag = new TextField();
        this.product = new TextField();
        this.line = new TextField();
    }

    private static MainWindowsComponent single = null;

    //静态工厂方法
    public static MainWindowsComponent getInstance() {
        if (single == null) {
            single = new MainWindowsComponent();
        }
        return single;
    }

    public TextArea getInfoArea() {
        return infoArea;
    }

    public TextField getInvoiceFlag() {
        return invoiceFlag;
    }

    public TextField getProduct() {
        return product;
    }

    public TextField getLine() {
        return line;
    }
}
